-
-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate UnitfulRecipes
into Plots
#4371
Conversation
Codecov ReportBase: 80.57% // Head: 80.80% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #4371 +/- ##
==========================================
+ Coverage 80.57% 80.80% +0.23%
==========================================
Files 28 30 +2
Lines 7319 7449 +130
==========================================
+ Hits 5897 6019 +122
- Misses 1422 1430 +8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Sounds good to me in principle, I'm happy to give any of my contributions to Plots.jl. I find it hard to say anything about the implementation, there seems to be quite some unrelated edits etc. But if Plots.jl maintainers approve I don't object. |
I'm all for integrating UnitfulRecipes.jl into Plots.jl as well! Just make sure this does not blow up TTFP! (Does it even affect it?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is any documentation we should also move that into main documentation.
Also the issues need to be moved.
@briochemc, @gustaphe, @jw3126 if any of you needs/wants push rights to keep working on this just react with a 👍🏻.
Regarding TTFP: master (or PR with using Unitful, UnitfulRecipes, Plots
const a = 1u"m/s^2"
v(t) = a * t
x(t) = a / 2 * t^2
main() = begin
t = (0:.01:100) * u"s"
plot(x.(t), v.(t), xlabel="position", ylabel="speed") |> display
return
end
@time main()
# 9.044844 seconds (5.55 M allocations: 289.532 MiB, 1.60% gc time, 96.24% compilation time: 16% of which was recompilation) PR using Unitful, Plots
const a = 1u"m/s^2"
v(t) = a * t
x(t) = a / 2 * t^2
main() = begin
t = (0:.01:100) * u"s"
plot(x.(t), v.(t), xlabel="position", ylabel="speed") |> display
return
end
@time main()
# 8.953737 (5.47 M allocations: 285.340 MiB, 1.35% gc time, 96.43% compilation time: 16% of which was recompilation) |
See JuliaPlots/PlotDocs.jl#302 (might need some rework, pending CI). |
Co-authored-by: Jan Weidner <[email protected]>
Concerning the push right question, by "this" do you mean this PR or (this part of) (now) Plots.jl? In the former case I don't think there is any need, the transfer seems quite straightforward. In the latter case, I will probably keep contributing, and it's up to you if you want that to happen by PR or if I should merge my own changes (in conjunction with the others) like before. I'm not intimately familiar with the granularity of GitHub permissions. |
I meant the latter. I think, you know the code best and therefore I would prefer having you being able to make calls on your own, therefore I will send you an invite. |
Thanks! At the moment I don't use Unitful much, so I probably do not need push access. Should that change, I will come back to you. |
The docs build are successful locally and look decent in a browser, but JuliaPlots/PlotDocs.jl#302 needs a new version of Plots with this PR merged. Note that I've disabled the notebook example in the docs for now, but this can be reworked later. So I will probably merge this PR when CI is green, unless comments / objections. Following that, the |
That's nice! But I was thinking more about TTFP for non-Unitful users. |
There is no impact since loading of the added master @time begin
using Plots
plot(1:2) |> display
end
13.199953 seconds (9.41 M allocations: 612.501 MiB, 4.65% gc time, 56.57% compilation time: 12% of which was recompilation) pr @time begin
using Plots
plot(1:2) |> display
end
13.254682 seconds (9.41 M allocations: 612.282 MiB, 4.77% gc time, 55.89% compilation time: 12% of which was recompilation) |
@jw3126, now that this is released starting from
Thanks all for the comments and suggestions. The new docs are available at https://docs.juliaplots.org/stable/unitfulrecipes/unitfulrecipes/. |
Fix jw3126/UnitfulRecipes.jl#79.
Fix #4366.
Fix #4114.
Conditionally import
UnitfulRecipes
whenUnitful
is imported.Per #4366 (comment), copy
src
andtest
code fromUnitfulRecipes
intoPlots
, with minorPlots
adjustements (related to@require
,@reexport
).Following this PR
UnitfulRecipes
should eventually be deprecated / archived.Cc significant
UnitfulRecipes
contributors: @briochemc @gustaphe @jw3126.Rework some
Plots
tests (causing import issues), which has the sided effect to fix long standingPlots
tests warnings.